"""
file: test_hook.py
Author: 城下秋草
Date: 2024/12/29
Desc: 
"""
import allure
import pytest

@allure.epic("pytest测试")
@allure.feature("hook功能")
@allure.story("参数化的支持")
@allure.title("hook测试")
@allure.description("""
**pytest 的hook机制提供的强大定制能力**
- pytest_generate_tests
- pytest_addoption


""")
@allure.label("owner","城下秋草")
@allure.tag("smoke","hook","测试")
def test_hook(testdata):
    print(testdata)
    allure.dynamic.severity(allure.severity_level.CRITICAL)
    allure.dynamic.testcase("testcase1")
    allure.dynamic.issue("bug-123")
    allure.dynamic.link("https://www.baidu.com")

    with allure.step("step1:"):
        print("step1:.......")
    with allure.step("step2:"):
        print("step2:.......")
    with allure.step("step3:"):
        print("step3:.......")

    assert True

@allure.epic("pytest测试")
@allure.feature("hook功能")
@allure.story("条件忽略")
@pytest.mark.testenv
def test_demo():
    assert False